Optimal. Leaf size=117 \[ \frac {2 (b B-a (A-C)) E\left (\left .\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )\right |2\right )}{f}+\frac {2 (3 A b+3 a B+b C) F\left (\left .\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )\right |2\right )}{3 f}-\frac {2 a A \cos (e+f x)}{f \sqrt {\sin (e+f x)}}-\frac {2 b C \cos (e+f x) \sqrt {\sin (e+f x)}}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {3110, 3102,
2827, 2720, 2719} \begin {gather*} \frac {2 F\left (\left .\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )\right |2\right ) (3 a B+3 A b+b C)}{3 f}+\frac {2 E\left (\left .\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )\right |2\right ) (b B-a (A-C))}{f}-\frac {2 a A \cos (e+f x)}{f \sqrt {\sin (e+f x)}}-\frac {2 b C \sqrt {\sin (e+f x)} \cos (e+f x)}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 2827
Rule 3102
Rule 3110
Rubi steps
\begin {align*} \int \frac {(a+b \sin (e+f x)) \left (A+B \sin (e+f x)+C \sin ^2(e+f x)\right )}{\sin ^{\frac {3}{2}}(e+f x)} \, dx &=-\frac {2 a A \cos (e+f x)}{f \sqrt {\sin (e+f x)}}-2 \int \frac {\frac {1}{2} (-A b-a B)-\frac {1}{2} (b B-a (A-C)) \sin (e+f x)-\frac {1}{2} b C \sin ^2(e+f x)}{\sqrt {\sin (e+f x)}} \, dx\\ &=-\frac {2 a A \cos (e+f x)}{f \sqrt {\sin (e+f x)}}-\frac {2 b C \cos (e+f x) \sqrt {\sin (e+f x)}}{3 f}-\frac {4}{3} \int \frac {\frac {1}{4} (-3 A b-3 a B-b C)-\frac {3}{4} (b B-a (A-C)) \sin (e+f x)}{\sqrt {\sin (e+f x)}} \, dx\\ &=-\frac {2 a A \cos (e+f x)}{f \sqrt {\sin (e+f x)}}-\frac {2 b C \cos (e+f x) \sqrt {\sin (e+f x)}}{3 f}-(-b B+a (A-C)) \int \sqrt {\sin (e+f x)} \, dx-\frac {1}{3} (-3 A b-3 a B-b C) \int \frac {1}{\sqrt {\sin (e+f x)}} \, dx\\ &=\frac {2 (b B-a (A-C)) E\left (\left .\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )\right |2\right )}{f}+\frac {2 (3 A b+3 a B+b C) F\left (\left .\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )\right |2\right )}{3 f}-\frac {2 a A \cos (e+f x)}{f \sqrt {\sin (e+f x)}}-\frac {2 b C \cos (e+f x) \sqrt {\sin (e+f x)}}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.54, size = 97, normalized size = 0.83 \begin {gather*} -\frac {6 (b B+a (-A+C)) E\left (\left .\frac {1}{4} (-2 e+\pi -2 f x)\right |2\right )+2 (3 A b+3 a B+b C) F\left (\left .\frac {1}{4} (-2 e+\pi -2 f x)\right |2\right )+\frac {2 \cos (e+f x) (3 a A+b C \sin (e+f x))}{\sqrt {\sin (e+f x)}}}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(515\) vs.
\(2(169)=338\).
time = 6.13, size = 516, normalized size = 4.41
method | result | size |
default | \(\frac {-A \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticF \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right ) a +A b \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticF \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right )+2 A \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticE \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right ) a +a B \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticF \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right )+B b \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticF \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right )-2 B b \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticE \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right )+a C \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticF \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right )+\frac {C \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticF \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right ) b}{3}-2 a C \sqrt {1+\sin \left (f x +e \right )}\, \sqrt {2-2 \sin \left (f x +e \right )}\, \sqrt {-\sin \left (f x +e \right )}\, \EllipticE \left (\sqrt {1+\sin \left (f x +e \right )}, \frac {\sqrt {2}}{2}\right )-\frac {2 C \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right ) b}{3}-2 A a \left (\cos ^{2}\left (f x +e \right )\right )}{\cos \left (f x +e \right ) \sqrt {\sin \left (f x +e \right )}\, f}\) | \(516\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.12, size = 249, normalized size = 2.13 \begin {gather*} \frac {\sqrt {2} \sqrt {-i} {\left (3 \, B a + {\left (3 \, A + C\right )} b\right )} \sin \left (f x + e\right ) {\rm weierstrassPInverse}\left (4, 0, \cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right ) + \sqrt {2} \sqrt {i} {\left (3 \, B a + {\left (3 \, A + C\right )} b\right )} \sin \left (f x + e\right ) {\rm weierstrassPInverse}\left (4, 0, \cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right ) - 3 \, \sqrt {2} \sqrt {-i} {\left (i \, {\left (A - C\right )} a - i \, B b\right )} \sin \left (f x + e\right ) {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, \cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )\right ) - 3 \, \sqrt {2} \sqrt {i} {\left (-i \, {\left (A - C\right )} a + i \, B b\right )} \sin \left (f x + e\right ) {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, \cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )\right ) - 2 \, {\left (C b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, A a \cos \left (f x + e\right )\right )} \sqrt {\sin \left (f x + e\right )}}{3 \, f \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \sin {\left (e + f x \right )}\right ) \left (A + B \sin {\left (e + f x \right )} + C \sin ^{2}{\left (e + f x \right )}\right )}{\sin ^{\frac {3}{2}}{\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 14.85, size = 169, normalized size = 1.44 \begin {gather*} \frac {2\,B\,b\,\mathrm {E}\left (\frac {e}{2}-\frac {\pi }{4}+\frac {f\,x}{2}\middle |2\right )}{f}-\frac {2\,B\,a\,\mathrm {F}\left (\frac {\pi }{4}-\frac {e}{2}-\frac {f\,x}{2}\middle |2\right )}{f}-\frac {2\,A\,b\,\mathrm {F}\left (\frac {\pi }{4}-\frac {e}{2}-\frac {f\,x}{2}\middle |2\right )}{f}+\frac {2\,C\,a\,\mathrm {E}\left (\frac {e}{2}-\frac {\pi }{4}+\frac {f\,x}{2}\middle |2\right )}{f}-\frac {A\,a\,\cos \left (e+f\,x\right )\,{\left ({\sin \left (e+f\,x\right )}^2\right )}^{1/4}\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {5}{4};\ \frac {3}{2};\ {\cos \left (e+f\,x\right )}^2\right )}{f\,\sqrt {\sin \left (e+f\,x\right )}}-\frac {C\,b\,\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^{5/2}\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{2};\ {\cos \left (e+f\,x\right )}^2\right )}{f\,{\left ({\sin \left (e+f\,x\right )}^2\right )}^{5/4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________